﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Uniforax.Camp.TestData.Common;
using Uniforax.Core.Common;
using Uniforax.Core.GameObjects;

namespace Uniforax.Camp.TestData.SmallMiner
{
    public class SmallMiner : BaseGameObject
    {
        public SmallMiner()
        {
            Init();
        }

        public SmallMiner(SmallMiner other) : base(other)
        {
            Copy(other);
        }

        private void Init()
        {
            HP = 100;
            PowerRequired = 2;
            SkillManager = new SmallMinerSkillManager();
            ArmorManager = new TestDataArmorManager();
        }

        private void Copy(SmallMiner copy)
        {
            HP = copy.HP;
            PowerRequired = copy.PowerRequired;
            SkillManager = copy.SkillManager.Clone() as SmallMinerSkillManager;
            ArmorManager = copy.ArmorManager.Clone() as TestDataArmorManager;
        }

        public override void OnPlacedGrid(ActionContext context, GameObjectPlaceGridMovementContext moveContext)
        {
            TestDataArmorManager.HandleOnPlaceUnlockUpgradeArmorAuto(context, this);
            base.OnPlacedGrid(context, moveContext);
        }

        public override object Clone()
        {
            return new SmallMiner(this);
        }
    }
}
